﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverLightClient
{
    public partial class Notification : UserControl
    {
        private int p;
        private string p_2;
        private string p_3;
        private DateTime dateTime;


        public Notification()
        {
            InitializeComponent();
        }
        
        public Notification(int id, string content, DateTime modifyDate, bool isNotification)
        {
            InitializeComponent();
            // TODO: Complete member initialization
            idLabl.Content = "id:" + id;
            typeLabel.Content = "New Message Added: " + content.Substring(0,Math.Min(10,content.Length));
            if (content.Length > 10)
            {
                typeLabel.Content += "...";
            }
            dateLabel.Content = "modified at " + modifyDate;
        }

        public Notification(int id, string topic, string content, DateTime modifyDate)
        {
            InitializeComponent();
            // TODO: Complete member initialization
            idLabl.Content = "id:" + id;
            typeLabel.Content = "Message Edited: " + topic + ": " + content.Substring(0, Math.Min(10, content.Length));
            if (content.Length > 10)
            {
                typeLabel.Content += "...";
            }
            dateLabel.Content = "modified at " + modifyDate;
        }
    }
}
